package game.utils;

import game.data.IRoleData;

using Reflect;

class IRoleDataTools {
	public static var defaultData:Dynamic = {x: 0, y: 0};

	/**
	 * 获得对应精灵图的偏移点
	 * @param data 
	 * @param name 
	 */
	public static function getOffestPoint(data:IRoleData, name:String):{
		x:Float,
		y:Float
	} {
		return data.offestConfig.getProperty(name) ?? defaultData;
	}
}
